package com.team11.server.controller.teacher;


import com.team11.server.service.IKcInformationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author pjc
 * @since 2021-06-14
 */
@CrossOrigin
@RestController
@RequestMapping("/teacher")
@Api(tags = "教师接口")
public class TeacherKcInformationController {
    @Autowired
    private IKcInformationService kcInformationService;

    @ApiOperation(value = "下拉框：所有课程名称")
    @GetMapping("/getAllKcName")
    public List getAllKcName() {
        List list = (List)kcInformationService.getAllKcName();
        return list;
    }

    @ApiOperation(value = "下发作业-->下拉框：所有课程名称及其id")
    @GetMapping("/getAllKcNameAndId")
    public List getAllKcNameAndId() {
        List list = (List)kcInformationService.getAllKcNameAndId();
        return list;
    }
}
